<template>
  <div class="about">
    <h1>This is an about page</h1>
    <p>{{count}}</p>
    <button @click = add>add</button>
    <button @click = req>req</button>
  </div>
</template>
<script>
export default {
  name: 'About',
  methods : {
    add(){
      this.$store.commit('setCount',2)
    },
    req(){
      this.$store.dispatch('reqCount',5);

    }
  },
  computed : {
      count(){
        // return this.$store.state.count;
        return this.$store.getters.count;
      }
  }

}
</script>